<?php
/*
* @desc 首页控制类
* @author kevin.wang
* @date 2015-01-01 12:00:00
*/
class HomeController extends Controller
{
	public  $layout = '/layouts/home';
	//首页
	public function actionIndex()
	{
		$this->render('index');
	}
	//网站错误页面
	public function actionError()
	{
		if($error=Yii::app()->errorHandler->error)
		{
			if(Yii::app()->request->isAjaxRequest)
				echo $error['message'];
			else
				$this->render('error', $error);
		}
	}
}
